package com.setDemo.hashSet;

import java.util.HashSet;

/**
 * @Author milian
 * @Date 2021/7/26 0026 17:11
 */
public class demo2 {
    public static void main(String[] args) {
        HashSet<Student> studentHashSet = new HashSet<>();
        Student s1 = new Student("李一", 13);
        Student s2 = new Student("李二", 12);
        Student s3 = new Student("李三", 11);
        studentHashSet.add(s1);
        studentHashSet.add(s2);
        studentHashSet.add(s3);
        for (Student s:studentHashSet
             ) {
            System.out.println(s);
        }

    }
}
